
# This file is a part of Simple-XX/SimpleCompiler
# (https://github.com/Simple-XX/SimpleCompiler).
#
# CMakeLists.txt for Simple-XX/SimpleCompiler.

# 设置项目名与版本
project(
        doc
        VERSION 0.0.1
)

# 设置 doxygen 相关参数
set(DOXYGEN_HAVE_DOT YES)
set(DOXYGEN_DOT_MULTI_TARGETS YES)
set(DOXYGEN_GENERATE_LATEX NO)
set(DOXYGEN_PROJECT_NAME ${SimpleRenderer_PROJECT_NAME})
set(DOXYGEN_PROJECT_NUMBER ${SimpleRenderer_PROJECT_VERSION})
set(DOXYGEN_PROJECT_BRIEF ${PROJECT_DESCRIPTION})
set(DOXYGEN_RECURSIVE YES)
set(DOXYGEN_EXCLUDE_PATTERNS */3rd/*, */.vscode/*, */.idea/*, */.github/*, */.git/*, */build*/*, */cmake-/*)
set(DOXYGEN_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_EXTRACT_PRIVATE YES)
set(DOXYGEN_EXTRACT_STATIC YES)
set(DOXYGEN_EXTRACT_LOCAL_CLASSES YES)
set(DOXYGEN_SOURCE_BROWSER YES)
set(DOXYGEN_INLINE_SOURCES YES)
set(DOXYGEN_ALPHABETICAL_INDEX YES)
set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_ENABLE_PREPROCESSING YES)
set(DOXYGEN_CLASS_DIAGRAMS YES)
set(DOXYGEN_CLASS_GRAPH YES)
set(DOXYGEN_GRAPHICAL_HIERARCHY YES)
set(DOXYGEN_CALLER_GRAPH YES)
set(DOXYGEN_CALL_GRAPH YES)
set(DOXYGEN_UML_LOOK YES)
set(DOXYGEN_HTML_TIMESTAMP YES)

# 创建 target 并通过 VERBATIM 将 cmake 参数传递给 doxygen
doxygen_add_docs(doc
        COMMENT "Generating docs at ${PROJECT_BINARY_DIR}/html/index.html ..."
        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
        ${SimpleRenderer_SOURCE_DIR}
)
